/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 *
 * @author jonatan.ojala
 */
public class derp {
     if(y - boxSizeY / 2 < b.y1 && x - boxSizeX / 2 > b.x && x + boxSizeX / 2 < b.x1 /*&& Math.abs((y - boxSizeY / 2) - b.y1) < offSetDistance*/) {
                y = b.y1 + boxSizeY / 2;
                System.out.println("Bot");
                botCollision = true;
                g.stopFalling();
            } else if(y + boxSizeY / 2 > b.y && x - boxSizeX / 2 > b.x && x + boxSizeX / 2 < b.x1 /*&& Math.abs((y + boxSizeY / 2) - b.y) < offSetDistance*/) {
                System.out.println("Top");
                g.stopFalling();
                y = b.y - boxSizeY / 2;
            } else if(x + boxSizeX / 2 > b.x && y + boxSizeY / 2 > b.y && y - boxSizeY / 2 < b.y1 /*&& Math.abs((x + boxSizeX / 2) - b.x) < offSetDistance*/) {
                x = b.x - boxSizeX / 2;
                speed = 0;
                System.out.println("Left");
            } else if(x - boxSizeX / 2 < b.x1 && y + boxSizeY / 2 > b.y && y - boxSizeY / 2 < b.y1 /*&& Math.abs((x - boxSizeX / 2) - b.x1) < offSetDistance*/) {
                x = b.x1 + boxSizeX / 2;
                speed = 0;
                System.out.println("Right");
            }
}
